<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div id="page-login" class="page-login">
    <div class="wrapper">
        <div class="wrapper-inner">
            <div class="form-login form-inline">
                <header class="header">
                    <div class="logo" title="<?php echo __('Magento Admin Panel') ?>"><span><?php echo __('Magento Admin Panel') ?></span></div>
                </header>
                <div id="messages" data-container-for="messages">
                    <?php echo $this->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
                </div>
                <form method="post" action="" id="login-form" autocomplete="off">
                    <fieldset class="fieldset">
                        <legend class="legend"><span><?php echo __('Welcome') ?></span></legend><br/>
                        <input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
                        <div class="field field-username">
                            <label for="username" class="label"><span><?php echo __('User Name:') ?></span></label>
                            <div class="control">
                                <input type="text" id="username" name="login[username]" value="" class="required-entry input-text" placeholder="<?php echo __('user name') ?>" />
                            </div>
                        </div>
                        <div class="field field-password">
                            <label for="login" class="label"><?php echo __('Password:') ?></label>
                            <div class="control">
                                <!-- This is a dummy hidden field to trick firefox from auto filling the password -->
                                <input type="text" class="input-text no-display" name="dummy" id="dummy" />
                                <input type="password" id="login" name="login[password]" class="required-entry input-text" value="" placeholder="<?php echo __('password') ?>" />
                            </div>
                        </div>
                        <?php echo $this->getChildHtml('form.additional.info'); ?>
                        <div class="form-actions">
                            <?php echo $this->getChildHtml('form.buttons'); ?>
                        </div>
                    </fieldset>
                </form>
                <script type="text/javascript">
                    require([
                        "jquery",
                        "mage/backend/form",
                        "mage/backend/validation"
                    ], function(jQuery){
                        jQuery('#login-form').form().validation();
                    });
                    jQuery(window).load(function(){
                        jQuery('#username').focus();
                    });
                </script>
            </div>
        </div>
    </div>
    <footer class="footer">
        <div class="footer-content">
            <div class="footer-copyright"><?php echo $this->getChildHtml('copyright');?></div>
        </div>
    </footer>
</div>
